package com.affectu.opus.action;

import java.util.ArrayList;
import java.util.List;

import org.jboss.seam.annotations.Name;

import com.affectu.dao.DAOBase;
import com.affectu.opus.Opus;

/**
 * Sep 28, 2008
 * 
 * @author daniel nathan
 */
@Name("opusShowAction")
public class Show extends DAOBase {

	@SuppressWarnings("unchecked")
	public List<Opus> getAllOpuses() {
		List<Opus> opuses = new ArrayList<Opus>();
		try {
			opuses = em.createQuery("from Opus o  order by o.id desc").list();
		} catch (Exception ex) {
			this.logException(ex);
		}
		return opuses;
	}
}
